<?php
declare (strict_types = 1);
namespace app\controller;

use app\BaseController;

// +--------------------------------------------------------------------------------------------------------------------
// | 目的: 演示如何继承基础控制器
// | 实现机制:
// | 核心流程示:
// | 注意:
// |
// +--------------------------------------------------------------------------------------------------------------------

class IndexBaseController extends BaseController
{
    public function index()
    {
        $action = $this->request->action();
        // 避免暴露系统的情况,屏蔽此句,测试时,可以打开
//        $path = $this->app->getBasePath();
        $path='';

        return json(['action'=>$action,'path'=>$path]);
    }
}